LassoScript Utility
Basics Browse Detail

[ChartFX->SetDataType]

Tag Link [ChartFX->SetDataType] Category ChartFX
Type Member Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type None Security None
Implementation Sets Lasso 8.5

Description

[ChartFX->SetDataType] sets the data type for a column to one of the following types. The tag requires two parameters. The first is a 0-based index selecting the column. The second is a string containing one of the types from the list below.

Chart FX will try to determine the types of columns automatically and usually does a good job, but if necessary this tag can be used to set the column types explicitly. By default the first column containing string data is assumed to be the legend and each column containing numeric data is assumed to be a data series.

DEFAULT: Numeric data is used as a data series. String data is used as a legend.

LABEL: The field will be read as a string and used as a legend.

VALUE: The field will be read as a number and used as a data series.

XVALUE: The field will be read as a number and used as the x-axis value for XY plots.

INI_VALUE: The field will be read as a number and used to set the the initial value for data points for floating bars and area charts.

NOT_USED: Instructs Chart FX to ignore this field from the result set.

KEY_LEGEND: The file will be read as a string and used as the key label for the x-axis.

Syntax

[Var:'MyChart'=ChartFX]
[$MyChart->SetWidth(800)]
[$MyChart->SetHeight(600)]
[$MyChart->SetTemplateStr(' ... ')]
[$MyChart->SetLassoData(Records_Array)]
[$MyChart->SetDataType(0,'NOT_USED')]
[$MyChart->SetDataType(1,'LABEL')]
[$MyChart->SetDataType(2,'VALUE')]
[$MyChart->SetDataType(3,'VALUE')]
[$MyChart->SetDataType(4,'NOT_USED')]
[$MyChart->Render]

Parameters

Required Parameters
Index The index of the column whose type is being set. Note - column indexes start at 0.
Optional Parameters
Type The type for the column. One of default, label, value, xvalue, ini_value, not_used, or key_legend.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.